// ****************************************************************************
//
// Logic 8: River cave mouth
//
// ****************************************************************************

#include "defines.txt"

if (new_room) {
  load.pic(room_no);
  draw.pic(room_no);
  discard.pic(room_no);
  set.horizon(37);

  // The next 6 lines need only be in the first room of the game
  /*if ((prev_room_no == 1 ||    // just come from intro screen
      prev_room_no == 0)) {    // or just started game
    position(ego,120,140);
    status.line.on();
    accept.input();
  }*/

// Check what room the player came from and position them on the
// screen accordingly here, e.g:
// if (prev_room_no == 5) {
//   position(ego,12,140);
// }
  position(ego,74,160);
  draw(ego);
  show.pic();
}

if (said("look")) {
  print("This is where the river emerges from the cave mouth.  You see a bush and a stone.");
}

if (said("look","stone")) {
    print("Yes...  a stone.");
    }

if (said("look","bush")) {
    if (obj.in.box(o0,35,70,60,90) &&
        !has("handle")) {
    print("You see a weird handle hidden behind the bush.");
    }
    else {
      print("You can't see much from here.");
      }
    }

if (said("get","handle")) {
    if (obj.in.box(o0,35,70,60,90)) {
      print("You take the handle.");
      get("handle");
      }
     else {
      print("You're not close enough.");
      }
     }

if (ego_edge_code == bottom_edge) {   // ego touching bottom edge of screen
  new.room(10);
}


return();